package com.destiny.controller;


import com.destiny.commons.vo.ResultVO;
import com.destiny.entity.Skillmonster;
import com.destiny.service.SkillmonsterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author et2110
 * @since 2022-03-10
 */
@RestController
@RequestMapping("/skillmonster")
public class SkillmonsterController {

    @Autowired
    SkillmonsterService skillmonsterService;

    @GetMapping("/{sid}")
    public ResultVO<List<Skillmonster>> getUser(@PathVariable int sid) {
        List<Skillmonster> skillList = skillmonsterService.getSkill(sid);
        return ResultVO.success(skillList);
    }
}

